package com.example.yiznspringtestinterface.controller;

import com.springtest.spi.Search;

import java.util.Iterator;
import java.util.ServiceLoader;

/**
 * project : my-learn
 * <p>  </p>
 *
 * @author yisl
 * @date 2022-06-08【星期三】
 **/
public class TestSPI {
    public static void main(String[] args) {
        ServiceLoader<Search> searches = ServiceLoader.load(Search.class);
        Iterator<Search> searchIterator = searches.iterator();
        while(searchIterator.hasNext()){
            Search search = searchIterator.next();
            search.searchDoc("china");
        }



        Integer m = new Integer(1);
        Integer n = new Integer(1);;
        System.out.println(m==n);

        String str1 = "abcd";
        String str2 = "abcd";
        String str3 = "ab"+"cd";
        System.out.println(str1==str2);
        System.out.println(str1==str3);

    }



}
